import request from '@/utils/request'

/**
 * @description: 采购订单
 * @param {*} params
 * @return {*}
 */
export function getCgddOrderList(params) {
  return request({
    url: '/order/cgdd/list',
    method: 'get',
    params
  })
}

/**
 * @description: 保存采购订单
 * @param {*} params
 * @return {*}
 */
export function saveCgddOrder(data) {
  return request({
    url: '/order/cgdd/add',
    method: 'post',
    data
  })
}

/**
 * @description: 获取采购订单详情
 * @param {*} params
 * @return {*}
 */
export function getCgddOrderDetail(params) {
  return request({
    url: '/order/cgdd/detail',
    method: 'get',
    params
  })
}

/**
 * @description: 审核、反审核
 * @param {*} data
 * @return {*}
 */
export function examineCgdd(data) {
  return request({
    url: '/order/cgdd/examine',
    method: 'post',
    data
  })
}

/**
 * @description: 更新采购订单
 * @param {*} data
 * @return {*}
 */
export function updateCgdd(data) {
  return request({
    url: '/order/cgdd/update',
    method: 'post',
    data
  })
}

/**
 * @description: 删除采购订单
 * @param {*} data
 * @return {*}
 */
export function deleteCgdd(data) {
  return request({
    url: '/order/cgdd/delete',
    method: 'post',
    data
  })
}
